def find_missing_students(n, m, reported_ids):
    arrived_set = set(reported_ids)
    all_students = set(range(1, n + 1))
    missing_students = sorted(all_students - arrived_set)
    return missing_students if missing_students else [0]

n, m = map(int, input().strip().split())
reported_ids = list(map(int, input().strip().split()))

result = find_missing_students(n, m, reported_ids)

print(" ".join(map(str, result)))